core: Delete unused ostree_create_temp_dir() API
authorColin Walters <walters@verbum.org>
Wed, 4 Sep 2013 12:18:45 +0000 (08:18 -0400)
committerColin Walters <walters@verbum.org>
Wed, 4 Sep 2013 12:18:45 +0000 (08:18 -0400)
Nothing was using it.  Poof.  Gone!

doc/ostree-sections.txt
src/libostree/ostree-core.c
src/libostree/ostree-core.h

index 8ef9f02641ed2a6371d752766ab9a46771449448..d8149f1c29c2cdb9364cb5e9cbc09441094af707 100644 (file)
@@ -40,7 +40,6 @@ ostree_checksum_file
 ostree_checksum_file_async
 ostree_checksum_file_async_finish
 ostree_create_directory_metadata
-ostree_create_temp_dir
 ostree_validate_structureof_objtype
 ostree_validate_structureof_csum_v
 ostree_validate_structureof_checksum_string
index 1ba6646de8bf2bfacb799ca553cf0b4640a31a12..e0984ca267707a753dcf3c8d9c5060ff0f602b2f 100644 (file)
@@ -1511,50 +1511,6 @@ zlib_file_header_parse (GVariant         *metadata,
   return ret;
 }
 
-/**
- * ostree_create_temp_dir:
- * @dir: Use this as temporary base
- * @prefix: (allow-none): Optional prefix
- * @suffix: (allow-none): Optional suffix
- * @out_file: (out): Path for newly created directory, file, or symbolic link
- * @cancellable: Cancellable
- * @error: Error
- *
- * Securely create a randomly-named temporary subdirectory of @dir.
- */
-gboolean
-ostree_create_temp_dir (GFile            *dir,
-                        const char       *prefix,
-                        const char       *suffix,
-                        GFile           **out_file,
-                        GCancellable     *cancellable,
-                        GError          **error)
-{
-  gboolean ret = FALSE;
-  gs_free char *template = NULL;
-  gs_unref_object GFile *ret_file = NULL;
-
-  if (dir == NULL)
-    dir = g_file_new_for_path (g_get_tmp_dir ());
-
-  template = g_strdup_printf ("%s/%s-XXXXXX",
-                              gs_file_get_path_cached (dir),
-                              prefix ? prefix : "tmp");
-  
-  if (mkdtemp (template) == NULL)
-    {
-      ot_util_set_error_from_errno (error, errno);
-      goto out;
-    }
-
-  ret_file = g_file_new_for_path (template);
-
-  ret = TRUE;
-  ot_transfer_out_value (out_file, &ret_file);
- out:
-  return ret;
-}
-
 /**
  * ostree_validate_structureof_objtype:
  * @objtype:
index 789813e29793bc2b6b148a446ef46981f8ea0253..12ba249821b0dad6b1625ec2212566595c133f6e 100644 (file)
@@ -228,13 +228,6 @@ gboolean ostree_checksum_file_async_finish (GFile          *f,
 GVariant *ostree_create_directory_metadata (GFileInfo *dir_info,
                                             GVariant  *xattrs);
 
-gboolean ostree_create_temp_dir (GFile            *dir,
-                                 const char       *prefix,
-                                 const char       *suffix,
-                                 GFile           **out_file,
-                                 GCancellable     *cancellable,
-                                 GError          **error);
-
 /** VALIDATION **/
 
 gboolean ostree_validate_structureof_objtype (guchar    objtype,